package com.itboye.textileexpres.myset;

import android.content.Intent;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.itboye.textileexpres.R;
import com.itboye.textileexpres.base.BaseActivity;
import com.itboye.textileexpres.base.WebActivity;
import com.itboye.textlieexpters.webview.WebSetActivity;

public class ActivityAbout extends BaseActivity implements OnClickListener {
	TextView title;
	ImageView back, img_other;

	RelativeLayout about_rel, call_us_rel, system_notice_rel,
			Copyright_information_rel, use_rel, feedback_rel;
	String url = "http://api.guannan.itboye.com/public/web.php/Web/";

	@Override
	public int initView() {
		// TODO Auto-generated method stub
		return R.layout.activity_about;
	}

	@Override
	public void onMyCreate() {
		// TODO Auto-generated method stub
		title.setText(R.string.aboutte);
		img_other.setVisibility(View.GONE);
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		Intent intent = null;
		switch (v.getId()) {
		case R.id.back:
			finish();
			break;
		case R.id.about_rel:
			intent = new Intent(this, WebActivity.class);
			intent.putExtra("url", url + "about");
			intent.putExtra("title", "关于我们");
			Log.e("hu", url + "about");
			startActivity(intent);
			break;
		case R.id.call_us_rel:
			intent = new Intent(this, WebActivity.class);
			intent.putExtra("url", url + "contact_us");
			intent.putExtra("title", "联系我们");
			startActivity(intent);
			break;
		case R.id.system_notice_rel:
			intent = new Intent(this, WebActivity.class);
			intent.putExtra("url", url + "system_notice");
			intent.putExtra("title", "系统通知");
			startActivity(intent);
			break;
		case R.id.Copyright_information_rel:
			intent = new Intent(this, WebActivity.class);
			intent.putExtra("url", url + "copyright");
			intent.putExtra("title", "版权信息");
			startActivity(intent);
			break;
		case R.id.use_rel:
			intent = new Intent(this, WebActivity.class);
			intent.putExtra("url", url + "agreement");
			intent.putExtra("title", "使用协议");
			startActivity(intent);
			break;
		case R.id.feedback_rel:
			intent = new Intent(this, WebActivity.class);
			intent.putExtra("url", url + "about");
			intent.putExtra("title", R.string.aboutus);
			startActivity(intent);
			break;
		default:
			break;
		}
	}
}
